package fuxi;

import java.util.ArrayList;
import java.util.List;

public class Zoo {

	
	List<Animo> Animos = new ArrayList<Animo>();
	public Zoo() {
		cat c1 = new cat();
		Dog d1 = new Dog();
		Dog d2 = new Dog();
		Animos.add(c1);
		Animos.add(d1);
		Animos.add(d2);
	}
	public void speak() {
		for(int i = 0;i<Animos.size();i++) {
			Animo a1 = Animos.get(i);
			a1.speak();
		}
	}

}
